Structural analysis of a chromatin model

from pytadbit.imp.impmodel import load_impmodel_from_cmm, load_impmodel_from_xyz

model = load_impmodel_from_cmm('./model.3261.cmm')

General shape of the model

Finding the center of mass and radius of gration

print model.center_of_mass()
print model.radius_of_gyration()
{'y': -11976.696977752474, 'x': 1459.4080388960351, 'z': -5505.949389580002}
2107.38031986

Radius of gyration (or gyradius) can also be seen with chimera:

model.view_model(tool='chimera_nogui', savefig='/tmp/image_model_2.png',centroid=True, gyradius=True)
model.view_model(tool='chimera_nogui', centroid=True, gyradius=True, savefig='/tmp/image_model_2.webm')
../_images/tutorial_7_single_model_analysis_8_0.png

Model length

print model.contour()
100002.254636

The length of the chromatin strand modelled is thus 100002 nm long.

Fitting model into a cube

Find the longest and shortest distance between 2 particles:

print model.longest_axe()
print model.shortest_axe()
7033.67649175
374.538753758

Characterize a cube that includes the model:

print model.cube_side()
print model.cube_volume()
8861.41178682
6.95838983082e+11

Chromatin accessibility: fitting objects inside the model

In order to infer which part of the modeled chromatin can be accessed by an object, like the transcription machinery, TADBit calculates a mesh around the model, and checks for each point of this mesh if an object of a given size can fit.

Here an example revealing the surface of a chromatin strand accessible to a hypothtical protein of 400 nanometers (radius of 200 nanometers):

acc_dots, tot_dots, acc_area, tot_area, acc_vs_inacc = model.accessible_surface(200, nump=100, verbose=True,
                                                                                write_cmm_file='./model_mesh.cmm',
                                                                                savefig='/tmp/model_mesh.webm',
                                                                                chimera_bin='chimera_nogui')
Accessible surface: 90.34 micrometers^2(17972 accessible times 0.00502654824574 micrometers)
   (17972 accessible dots of 22080 total times 0.00503 micrometers)
 - 81.39% of the contour mesh
 - 71.6% of a virtual straight chromatin (126.17 microm^2)

The function bellows gives an important amount of information.

  • The text printed (when verbose=True), corresponds to some general statistics about the accessibility of the chromatin. * In this example 81% of the chromatine is accessible by the hypothetical protein. This number does not only includes particles, but also the edges linking the particles (remember that a particle is a representation of a given locus of DNA). The second percentage printed corresponds to the percentage of accessible chromatine without taking into consideration its folding (or consideraing a straight strand of chromatine). * As stated above, in order to infer the proportion of accessible chromatin, a mesh is drawn around the chromatin strand. This mesh represents all possible position of the hypothetical protein. Information about surface are relative to this mesh, not to the real accessible surface of the chromatine. However the number are proportional. * The dots also mentioned in the output are the representation of the mesh, their number is proportional to the nump parameter. The accessibility is measures using this dots, if a dot is distant enough from any point of the chromatin strand, than it is considered as accessible; while if some part of the chromatin lies closer than the radius of the hypothetical protein to one dot, this dot is considered inaccessible as this protein could not fit in its place. See the movie below (generated using the savefig parameter) for a better understanding, dots are dsplayed in green when they represented possible placement of the hypothetical protein, or in red when the protein would not fit.
acc_dots, tot_dots, acc_area, tot_area, acc_vs_inacc = model.accessible_surface(200, nump=100, verbose=True,
                                                                                include_edges=False,
                                                                                write_cmm_file='./model_partmesh.cmm',
                                                                                savefig='/tmp/model_partmesh.webm',
                                                                                chimera_bin='chimera_nogui')
Accessible surface: 19.46 micrometers^2(3872 accessible times 0.00502654824574 micrometers)
   (3872 accessible dots of 4125 total times 0.00503 micrometers)
 - 93.87% of the contour mesh
 - 15.43% of a virtual straight chromatin (126.17 microm^2)